<%= error_messages_for :ticket_template %>
<table border = "0" width = "100%"><tr><td>
 	<label for="ticket_template_name">Name: </label>
	<%= f.text_field :name  %></td>
	<td align = 'right'><%= add_note_type_link "Add a note type" %>   <%= submit_tag 'Done' %></td></tr></table>
	
<div style="float:left;width:100%;">
<ul id="note_types" type ="none" style="float:left;width:30%;border-style:dotted;border-color:green;padding:0px;">
  <br />
  <%= render :partial => 'note_type', :collection => @ticket_template.note_types_col(0) %>
</ul>
<ul type ="none" id="note_types1" style="float:left;width:30%;border-style:dotted;border-color:green;padding:0px;">
  <br />
  <%= render :partial => 'note_type', :collection => @ticket_template.note_types_col(1) %>
</ul>
<ul id="note_types2" type ="none" style="float:left;width:30%;border-style:dotted;border-color:green;padding:0px;">
  <br />
  <%= render :partial => 'note_type', :collection => @ticket_template.note_types_col(2) %>
</ul>
</div>

<script type="text/javascript">
// <![CDATA[
  Sortable.create("note_types",
    {dropOnEmpty:true,handle:'handle',containment:["note_types","note_types1","note_types2"],constraint:false});
  Sortable.create("note_types1",
    {dropOnEmpty:true,handle:'handle',containment:["note_types","note_types1","note_types2"],constraint:false});
  Sortable.create("note_types2",
    {dropOnEmpty:true,handle:'handle',containment:["note_types","note_types1","note_types2"],constraint:false});
// ]]>
</script>
